import axios from '../http/request'

// 获取所有的考试类型
function getExamType(params) {
    return axios.get('/exam/examType')
}

// 获取所有的课程
function getExamSubject(params) {
    return axios.get('/exam/subject')
}

// 获取所有的试题类型
function getQuestionsType(params) {
    return axios.get('/exam/getQuestionsType')
}

// 添加试题接口
function addQuestions(params) {
    return axios.post('/exam/questions', params)
}

// 添加试题类型
function insertQuestionsType(params) {
    return axios.get('/exam/insertQuestionsType', {
        params
    })
}

// 删除指定的试题类型
function delQuestionsType(params) {
    return axios.post('/exam/delQuestionsType', params)
}

// 按条件获取试题
function getQuestionsCondition(params) {
    return axios.get('/exam/questions/condition', {
        params
    })
}

// 获取所有的试题
function getQuestionsNew() {
    return axios.get('/exam/questions/new')
}


export {
    getExamType,
    getExamSubject,
    getQuestionsType,
    addQuestions,
    insertQuestionsType,
    delQuestionsType,
    getQuestionsCondition,
    getQuestionsNew
}